import { IFragmentPreviewData } from "@library/utility/fragmentsRegistry";
import OriginalPostFragment from "@library/widget-fragments/OriginalPostFragment.injectable";
import { blessStringAsSanitizedHtml } from "@vanilla/dom-utils";
import { uuidv4 } from "@vanilla/utils";

const previewData: Array<IFragmentPreviewData<OriginalPostFragment.Props>> = [
    {
        previewDataUUID: uuidv4(),
        name: "Default",
        description: "An example of an original post fragment",
        data: {
            discussion: {
                discussionID: 9999999,
                type: "discussion",
                name: "Post Title",
                body: blessStringAsSanitizedHtml(
                    "This content is generated by users on the site. You can't update it here.<br><br>This content is generated by users on the site. You can't update it here. This content is generated by users on the site. You can't update it here.<br><br>This content is generated by users on the site. You can't update it here.",
                ),
                url: "https://vanillaforums.com/discussion/999999",
                canonicalUrl: "https://vanillaforums.com/discussion/999999",
                dateInserted: "2020-10-06T15:30:44+00:00",
                insertUserID: 1,
                insertUser: {
                    userID: 1,
                    name: "Joe Walsh",
                    dateLastActive: "2016-07-25 17:51:15",
                    photoUrl:
                        "https://user-images.githubusercontent.com/1770056/74098133-6f625100-4ae2-11ea-8a9d-908d70030647.png",
                    label: "SuperModerator",
                    title: "Manager",
                    banned: 0,
                    roles: [
                        {
                            roleID: 0,
                            name: "Moderator",
                        },
                    ],
                    private: false,
                },
                dateUpdated: "2020-10-06T15:30:44+00:00",
                dateLastComment: "2020-10-06T15:30:44+00:00",
                pinned: false,
                closed: false,
                score: 0,
                countViews: 999,
                countComments: 9999,
                categoryID: 1111111111111111,
                category: {
                    name: "Category 1",
                    url: "#",
                    categoryID: 1111111111111111,
                },
                reactions: [
                    {
                        tagID: 1,
                        urlcode: "Promote",
                        name: "Promote",
                        class: "Positive",
                        hasReacted: false,
                        reactionValue: 5,
                        count: 0,
                    },
                    {
                        tagID: 2,
                        urlcode: "Disagree",
                        name: "Disagree",
                        class: "Negative",
                        hasReacted: false,
                        reactionValue: 0,
                        count: 3,
                    },
                    {
                        tagID: 3,
                        urlcode: "Agree",
                        name: "Agree",
                        class: "Positive",
                        hasReacted: true,
                        reactionValue: 1,
                        count: 2,
                    },
                    {
                        tagID: 4,
                        urlcode: "Like",
                        name: "Like",
                        class: "Positive",
                        hasReacted: false,
                        reactionValue: 1,
                        count: 0,
                    },
                    {
                        tagID: 5,
                        urlcode: "LOL",
                        name: "LOL",
                        class: "Positive",
                        hasReacted: false,
                        reactionValue: 0,
                        count: 7,
                    },
                ],
                statusID: 1,
                resolved: true,
            },
            category: {
                name: "Category 1",
                url: "#",
                categoryID: 1111111111111111,
            },
        },
    },
];
export default previewData;
